<!DOCTYPE html>
<!--suppress ALL-->
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="b">
    <div id="all" style="padding-top: 20px">
        <div id="content">
            <div class="container">
                <div class="row">
                    <div class="col-lg-12">
                        <!-- breadcrumb-->
                        <nav aria-label="breadcrumb">
                            <ol class="breadcrumb">
                                <li class="breadcrumb-item"><a href="/">主页</a></li>
                                <li aria-current="page" class="breadcrumb-item active" th:text="${title}"></li>
                            </ol>
                        </nav>
                    </div>
                    <div class="col-lg-3"></div>
                    <div class="col-lg-6">
                        <div class="box">
                            <h1 style="text-align: center">用户注册</h1>
                            <p class="lead">欢迎注册<span style="float: right">已有账号?<a href="/login">登录</a></span></p>
                            <hr>
                            <form action="/customer/save" method="post" enctype="multipart/form-data" onsubmit="return checkCustomerAddValue()">
                                <div class="form-group">
                                    <label>用户名:</label><span id="userErrorInfo" style="color: red"></span><span id="userSuccessInfo" style="color: mediumspringgreen"></span>
                                    <input id="userName" name="userName" type="text" required="required" class="form-control" onblur="checkUserName(this.value)"
                                           th:value="${customer==null?'':customer.userName}" placeholder="必填">
                                </div>
                                <div class="form-group">
                                    <label>密码:</label><span id="passwordErrorInfo" style="color: red"></span>
                                    <input id="password1" name="password" type="password" required="required" class="form-control" onblur="checkPassword(this.value)"
                                           th:value="${customer==null?'':customer.password}" placeholder="必填">
                                </div>
                                <div class="form-group">
                                    <label>确认密码:</label>
                                    <input id="password2" name="password2" type="password" required="required" class="form-control"
                                           th:value="${customer==null?'':customer.password2}" placeholder="必填">
                                </div>
                                <div class="form-group">
                                    <label>真实姓名:</label>
                                    <input id="contact" name="contact" type="text" required="required" class="form-control"
                                           th:value="${customer==null?'':customer.contact}" placeholder="必填">
                                </div>
                                <div class="form-group">
                                    <label>头像:</label>
                                    <input type="file" name="customerImage">
                                </div>
                                <div class="form-group">
                                    <label>联系方式:</label>
                                    <input id="number" name="number" type="text" required="required" class="form-control"
                                           th:value="${customer==null?'':customer.number}" placeholder="必填">
                                </div>
                                <div class="form-group">
                                    <label>收货地址:</label>
                                    <input id="address" name="address" required="required" type="text" class="form-control"
                                           th:value="${customer==null?'':customer.address}" placeholder="必填">
                                </div>
                                <div class="form-group">
                                    <label>公司名称:</label>
                                    <input id="name" name="name" type="text" class="form-control" placeholder="可不填..."
                                           th:value="${customer==null?'':customer.name}">
                                </div>
                                <div class="text-center">
                                    <button type="submit" class="btn btn-primary"><i class="fa fa-user-md"></i> 立即注册
                                    </button>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>